package br.spring.performers;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import br.spring.instruments.Instrument;

@Component
public class Instrumentalist implements Performer {

	public Instrumentalist() {
	}

	@Value("Jingle")
	private String song;
	@Autowired
	@Qualifier("piano")
	private Instrument instrument;

	public void perform() throws PerformanceException {
		System.out.print("Playing " + song + " :");
		instrument.play();

	}

	public String getSong() {
		return song;
	}

	public void setSong(String song) {
		this.song = song;
	}

	public String screamSong() {
		return song;
	}

	public void setInstrument(Instrument instrument) {
		this.instrument = instrument;
	}

}
